<%@ page import="java.util.List" %>
<%@ page import="top.wuyang.study.javawebjdbc.workgonggao.TbGonggao" %>
<%@ page import="top.wuyang.study.javawebjdbc.workgonggao.TbGonggaoDAO" %><%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2024/5/21
  Time: 9:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>公告主页面</title>
    <link rel="stylesheet" href="gonggao.css">
</head>
<body>

<%
    List<TbGonggao> list = TbGonggaoDAO.query();
%>

<h2>公告</h2>

<hr>

<table class="table">

    <thead>
    <tr>
        <th>发布编号</th>
        <th>公告标题</th>
        <th>公告作者</th>
        <th>公告内容</th>
        <th>发布时间</th>
        <th>
            <span>操作</span>
            <span id="addgg">添加</span>
        </th>
    </tr>
    </thead>
    <tbody>
    <% for (TbGonggao tbGonggao : list) { %>
    <tr>
        <td><%=tbGonggao.getId()%></td>
        <td><%=tbGonggao.getGgtitle()%></td>
        <td><%=tbGonggao.getGgauthor()%></td>
        <td><%=tbGonggao.getGginfo()%></td>
        <td><%=tbGonggao.getGgdate()%></td>
        <td>
            <a href="ggdelete.jsp?id=<%=tbGonggao.getId()%>">删除</a>
<%--            <span id="delgg">删除</span>--%>
            <span id="zdgg">置顶</span>
        </td>
    </tr>
    <% } %>
    </tbody>

</table>


<script src="gonggao.js"></script>
</body>
</html>
